Configuring SSL
The Secure Sockets Layer (SSL) protocol provides communication security by encrypting traffic across a network in a way designed to prevent eavesdropping and tampering. It uses asymmetric cryptography for privacy and a keyed message authentication code for message reliability. Setting up an SSL-secured connection requires a digital certificate issued by a trusted certificate authority.
The Web Application Utility can be run with SSL enabled. The process of creating an environment in the Rules Palette requires specifying a Web Service URL to the Web Application Utility. This URL can specify whether SSL is used.
Steps to Configure SSL/https:
- Log in to the WebSphere console.
- Expand Server Types and click WebSphere Application Servers.
- Click on the server you created. Example: PALETTE_SERVER.
- Expand Port and copy the WC_defaulthost_secure = port number. Example: WC_defaulthost_secure = 9444. This will be pasted in step 7.
- In the Domain Structure box on the left side of the screen, expand Environment and click Virtual Hosts.
- Expand default_host and click Host_Aliases.
- Click New and paste the port number from step 4. Click OK.
- Restart the server/JVM.
- Navigate to https://machinename:9444/PaletteConfig in Internet Explorer to access the Web Application Utility login page.
Steps to Configure Certificates
32 bit WebSphere Aapplication Server
IBM_JAVA_SECLIB = C:\Program Files (x86)\ WebSphere\AppServer\java\jre\lib\security
IBM_JAVA_HOME = C:\Program Files (x86)\IBM\WebSphere\AppServer\java
64 bit WebSphere Application Server
IBM_JAVA_SECLIB = C:\Program Files\ WebSphere\AppServer\java\jre\lib\security
IBM_JAVA_HOME = C:\Program Files\IBM\WebSphere\AppServer\java
- If WebSphere is not installed on your machine, download and install the IBM JDK.
URL to download: http://www.ibm.com/developerworks/java/jdk/ - Start the WebSphere application server.
- Enable SSL in WebSphere by following the steps below.
- Login to the WebSphere console.
- Expand Server Types and click WebSphere Application Servers.
- Click on the server you created. Example: PALETTE_SERVER.
- Expand Port and copy the WC_defaulthost_secure= port number. Example: WC_defaulthost_secure = 9445. This will be pasted in Host_Aliases below.
- In the Domain Structure box on the left side of the screen, expand Environment and click on Virtual Hosts.
- Expand default_host and click on Host_Aliases.
- Click New and paste the port number you copied in the step above. Click OK.
- Go to IBM_JAVA_SECLIB\security and comment out the details below in the java.security file.
Note: Make sure to uncomment the Default JSSE socket factories and comment out the WebSphere socket factories (in cryptosf.jar).
- Default JSSE socket factories
ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl
ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl
- WebSphere socket factories (in cryptosf.jar)
#ssl.SocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLSocketFactory
#ssl.ServerSocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLServerSocketFactory
- Stop the server/JVM, Node Agent and Deployment Manager.
- Start the server/JVM, Node Agent and Deployment Manager.
- Navigate to https://localhost:9445/PaletteConfig in Internet Explorer to make sure SSL works as expected.
- Log in to the application. If this action is successful, then SSL is set up correctly from the server side.
- Go to IBM_JAVA_HOME\bin and run the commands below.
keytool -genkey -keystore ../lib/security/wsse.keystore -storepass keyalg RSA -keysize 1024 -validity 1000 -alias localhost -dname "CN=localhost"
keytool -export -keystore ../lib/security/wsse.keystore -storepass alias localhost -file ./lib/security/localhost.cer
keytool -import -keystore ../lib/security/wsse.truststore -storepass trustcacerts -alias localhost -file ../lib/security/localhost.cer
- The step above will create two files within IBM_JAVA_SECLIB.
- wsse.keystore
- wsse.truststore
- Move wsse.keystore and wsse.truststore to conf folder where all properties files reside.
Example: C:\OIPA\conf
- Log in to the WebSphere console, go to Application servers > OIRP > Process definition > Java Virtual Machine and add the arguments below to JVM.
-Duser.language=en
-Duser.region=US
-Djava.net.preferIPv4Stack=true
-Djava.net.preferPv6Addresses=false
-javaagent:C:\OIPA\lib\spring-instrument-5.3.30.jar
-Dtangosol.coherence.override=C:\OIPA\conf \coherence-config.xml
-Dtangosol.coherence.cacheconfig=C:\OIPA\conf \coherence-cache-config.xml
-Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml
-Djavax.net.ssl.trustStore=C:\OIPA\conf\wsse.truststore
-Djavax.net.ssl.trustStorePassword=Djavax.net.ssl.keyStore=C:\OIPA\conf\wsse.keystore
-Djavax.net.ssl.keyStorePassword=jbossws
- Go to IBM_JAVA_SECLIB and create a backup of the cacerts file.
- Create a new certification (cacerts) file by following the steps below.
- Copy InstallCert.class and InstallCert$SavingTrustManager.class in IBM_JAVA_HOME\bin.
- From IBM_JAVA_HOME\bin, run InstallCert through command prompt like java InstallCert localhost:9445. The KeyStore jssecacerts will load and a connection will be opened. Then messages will be presented regarding the certificates.
- When the process is complete, the following message will appear: Enter certificate to add to trusted keystore or 'q' to quit. Type 1 to continue.
- When the process is complete, another message will appear: Added certificate to keystore 'jssecacerts' using 'jssecacers' using alias 'localhost-1'. Run java InstallCert localhost:9445 one more time, then enter q to exit. This will create a new jssecacerts keystore.
Note: Repeat step 7 to enable SSL for different port numbers.
- Stop the WebSphere application server (JVM, Node Agent, Deployment Manager).
- Restart the machine.
- Start the WebSphere application server (JVM, Node Agent, Deployment Manager).
- Navigate to https://machinename:9445/PaletteConfig in the Internet Explorer to access the Web Application Utility login page.